package com.crealth.model;

import java.io.Serializable;

import com.alibaba.fastjson.JSONObject;
import com.crealth.utils.Utils;

public class KnowledgePledgetLoanModel implements Serializable {
	private static final long serialVersionUID = 2803L;
	
	private int id;  //抵押贷款 知识
	private String name;  //名称
	private String product;  //产品
	private String loanAmount;  //额度
	private String percentage;  //成数
	private String interestRate;  //利率
	private String houseAge;  //房龄
	private String deadline;  //期限
	private String transferOwnership;  //过户时间
	private String approval;  //批复
	private String censusRegister;  //户籍
	private String age;  //年龄
	private String compangeAge;  //公司/工龄
	private String credit;  //信用要求
	private String bankFlow;  //流水
	private String extendLoanTm;  //放款
	private String valuationFee;  //评估费
	private String pledgeZy;  //质押
	private String useReturnedMoney;  // 用途回款
	private String memo;  //备注
	private String consumerCredit;  //消费贷
	private String businessLoans;  //经营贷
	private String cityName;  // 哪个城市
	
	public KnowledgePledgetLoanModel() {
		id = 0;  //抵押贷款 知识
		name = "";  //名称
		product = "";  //产品
		loanAmount = "";  //额度
		percentage = "";  //成数
		interestRate = "";  //利率
		houseAge = "";  //房龄
		deadline = "";  //期限
		transferOwnership = "";  //过户时间
		approval = "";  //批复
		censusRegister = "";  //户籍
		age = "";  //年龄
		compangeAge = "";  //公司/工龄
		credit = "";  //信用要求
		bankFlow = "";  //流水
		extendLoanTm = "";  //放款
		valuationFee = "";  //评估费
		pledgeZy = "";  //质押
		useReturnedMoney = "";  // 用途回款
		memo = "";  //备注
		consumerCredit = "";  //消费贷
		businessLoans = "";  //经营贷
		cityName = "";  // 哪个城市
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getProduct() {
		return product;
	}
	public void setProduct(String product) {
		this.product = product;
	}
	public String getLoanAmount() {
		return loanAmount;
	}
	public void setLoanAmount(String loanAmount) {
		this.loanAmount = loanAmount;
	}
	public String getPercentage() {
		return percentage;
	}
	public void setPercentage(String percentage) {
		this.percentage = percentage;
	}
	public String getInterestRate() {
		return interestRate;
	}
	public void setInterestRate(String interestRate) {
		this.interestRate = interestRate;
	}
	public String getHouseAge() {
		return houseAge;
	}
	public void setHouseAge(String houseAge) {
		this.houseAge = houseAge;
	}
	public String getDeadline() {
		return deadline;
	}
	public void setDeadline(String deadline) {
		this.deadline = deadline;
	}
	public String getTransferOwnership() {
		return transferOwnership;
	}
	public void setTransferOwnership(String transferOwnership) {
		this.transferOwnership = transferOwnership;
	}
	public String getApproval() {
		return approval;
	}
	public void setApproval(String approval) {
		this.approval = approval;
	}
	public String getCensusRegister() {
		return censusRegister;
	}
	public void setCensusRegister(String censusRegister) {
		this.censusRegister = censusRegister;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	public String getCompangeAge() {
		return compangeAge;
	}
	public void setCompangeAge(String compangeAge) {
		this.compangeAge = compangeAge;
	}
	public String getCredit() {
		return credit;
	}
	public void setCredit(String credit) {
		this.credit = credit;
	}
	public String getBankFlow() {
		return bankFlow;
	}
	public void setBankFlow(String bankFlow) {
		this.bankFlow = bankFlow;
	}
	public String getExtendLoanTm() {
		return extendLoanTm;
	}
	public void setExtendLoanTm(String extendLoanTm) {
		this.extendLoanTm = extendLoanTm;
	}
	public String getValuationFee() {
		return valuationFee;
	}
	public void setValuationFee(String valuationFee) {
		this.valuationFee = valuationFee;
	}
	public String getPledgeZy() {
		return pledgeZy;
	}
	public void setPledgeZy(String pledgeZy) {
		this.pledgeZy = pledgeZy;
	}
	public String getUseReturnedMoney() {
		return useReturnedMoney;
	}
	public void setUseReturnedMoney(String useReturnedMoney) {
		this.useReturnedMoney = useReturnedMoney;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public String getConsumerCredit() {
		return consumerCredit;
	}
	public void setConsumerCredit(String consumerCredit) {
		this.consumerCredit = consumerCredit;
	}
	public String getBusinessLoans() {
		return businessLoans;
	}
	public void setBusinessLoans(String businessLoans) {
		this.businessLoans = businessLoans;
	}	
	public String getCityName() {
		return cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	
	public JSONObject toJSONObject() {		
		JSONObject resJson = new JSONObject();
		resJson.put("id", id);
		resJson.put("name", name);
		resJson.put("product", product);
		resJson.put("loanAmount", loanAmount);
		resJson.put("percentage", percentage);
		resJson.put("interestRate", interestRate);
		resJson.put("houseAge", houseAge);
		resJson.put("deadline", deadline);
		resJson.put("transferOwnership", transferOwnership);
		resJson.put("approval", approval);
		resJson.put("censusRegister", censusRegister);
		resJson.put("age", age);
		resJson.put("compangeAge", compangeAge);
		resJson.put("credit", credit);
		resJson.put("bankFlow", bankFlow);
		resJson.put("extendLoanTm", extendLoanTm);
		resJson.put("valuationFee", valuationFee);
		resJson.put("pledgeZy", pledgeZy);
		resJson.put("useReturnedMoney", useReturnedMoney);
		resJson.put("memo", memo);
		resJson.put("consumerCredit", consumerCredit);
		resJson.put("businessLoans", businessLoans);
		resJson.put("cityName", cityName);
		
		return resJson;
	}
	
	public void parseFromJson(JSONObject json) {
		id = Utils.getJsonIntValue(json, "id", 0);
		name = Utils.getJsonString(json, "name");
		product = Utils.getJsonString(json, "product");
		loanAmount = Utils.getJsonString(json, "loanAmount");
		percentage = Utils.getJsonString(json, "percentage");
		interestRate = Utils.getJsonString(json, "interestRate");
		houseAge = Utils.getJsonString(json, "houseAge");
		deadline = Utils.getJsonString(json, "deadline");
		transferOwnership = Utils.getJsonString(json, "transferOwnership");
		approval = Utils.getJsonString(json, "approval");
		censusRegister = Utils.getJsonString(json, "censusRegister");
		age = Utils.getJsonString(json, "age");
		compangeAge = Utils.getJsonString(json, "compangeAge");
		credit = Utils.getJsonString(json, "credit");
		bankFlow = Utils.getJsonString(json, "bankFlow");
		extendLoanTm = Utils.getJsonString(json, "extendLoanTm");
		valuationFee = Utils.getJsonString(json, "valuationFee");
		pledgeZy = Utils.getJsonString(json, "pledgeZy");
		useReturnedMoney = Utils.getJsonString(json, "useReturnedMoney");
		memo = Utils.getJsonString(json, "memo");
		consumerCredit = Utils.getJsonString(json, "consumerCredit");
		businessLoans = Utils.getJsonString(json, "businessLoans");
		cityName = Utils.getJsonString(json, "cityName");
	}
	
	
}
